Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable-4] ec2_instance - update build_run_instance_spec to skip TagSpecification if None #1162

Conversation

tremble
Copy link
Contributor

@tremble tremble commented Oct 12, 2022

Partial backport of #1151

SUMMARY

When no tags are supplied, build_run_instance_spec currently includes 'TagSpecification': None. This results in botocore throwing an exception.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

plugins/modules/ec2_instance.py

ADDITIONAL INFORMATION

…n if None (ansible-collections#1151)

ec2_instance - update build_run_instance_spec to skip TagSpecification if None

SUMMARY
fixes: ansible-collections#1148
When no tags are supplied, build_run_instance_spec currently includes 'TagSpecification': None.  This results in botocore throwing an exception.
Also renames instance_role to iam_instance_profile (keeping the original as an alias).  While this could be split off, I'll just perform a partial backport for the bugfix when backporting to 4.x, while working through some unit tests the inaccuracy of the parameter name was apparent.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
plugins/modules/ec2_instance.py
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Gonéri Le Bouder <[email protected]>
@github-actions
Copy link

github-actions bot commented Oct 12, 2022

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

@ansibullbot ansibullbot added bug This issue/PR relates to a bug community_review integration tests/integration module module needs_maintainer needs_triage plugins plugin (any type) tests tests labels Oct 12, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 4m 32s
✔️ build-ansible-collection SUCCESS in 6m 13s
✔️ ansible-test-sanity-aws-ansible-python38 SUCCESS in 9m 59s
✔️ ansible-test-sanity-aws-ansible-2.12-python38 SUCCESS in 9m 58s
✔️ ansible-test-sanity-aws-ansible-2.13-python38 SUCCESS in 9m 02s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 7m 00s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 7m 11s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 7m 23s
✔️ cloud-tox-py3 SUCCESS in 4m 24s
✔️ ansible-test-splitter SUCCESS in 3m 24s
✔️ integration-amazon.aws-1 SUCCESS in 35m 08s
✔️ integration-amazon.aws-2 SUCCESS in 14m 14s
⚠️ integration-amazon.aws-3 SKIPPED
⚠️ integration-amazon.aws-4 SKIPPED
⚠️ integration-amazon.aws-5 SKIPPED
⚠️ integration-amazon.aws-6 SKIPPED
⚠️ integration-amazon.aws-7 SKIPPED
⚠️ integration-amazon.aws-8 SKIPPED
⚠️ integration-amazon.aws-9 SKIPPED
⚠️ integration-amazon.aws-10 SKIPPED
⚠️ integration-amazon.aws-11 SKIPPED
⚠️ integration-amazon.aws-12 SKIPPED
⚠️ integration-amazon.aws-13 SKIPPED
⚠️ integration-amazon.aws-14 SKIPPED
⚠️ integration-amazon.aws-15 SKIPPED
⚠️ integration-amazon.aws-16 SKIPPED
⚠️ integration-amazon.aws-17 SKIPPED
⚠️ integration-amazon.aws-18 SKIPPED
⚠️ integration-community.aws-1 SKIPPED
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
✔️ ansible-test-changelog SUCCESS in 2m 45s

@tremble tremble requested a review from goneri October 12, 2022 14:15
@tremble tremble added the mergeit Merge the PR (SoftwareFactory) label Oct 19, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

✔️ ansible-galaxy-importer SUCCESS in 4m 15s
✔️ build-ansible-collection SUCCESS in 4m 58s
✔️ ansible-test-sanity-aws-ansible-python38 SUCCESS in 8m 44s
✔️ ansible-test-sanity-aws-ansible-2.12-python38 SUCCESS in 8m 45s
✔️ ansible-test-sanity-aws-ansible-2.13-python38 SUCCESS in 8m 33s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 7m 32s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 27s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 7m 12s
✔️ cloud-tox-py3 SUCCESS in 3m 23s
✔️ ansible-test-splitter SUCCESS in 2m 42s
✔️ integration-amazon.aws-1 SUCCESS in 35m 40s
✔️ integration-amazon.aws-2 SUCCESS in 13m 55s
⚠️ integration-amazon.aws-3 SKIPPED
⚠️ integration-amazon.aws-4 SKIPPED
⚠️ integration-amazon.aws-5 SKIPPED
⚠️ integration-amazon.aws-6 SKIPPED
⚠️ integration-amazon.aws-7 SKIPPED
⚠️ integration-amazon.aws-8 SKIPPED
⚠️ integration-amazon.aws-9 SKIPPED
⚠️ integration-amazon.aws-10 SKIPPED
⚠️ integration-amazon.aws-11 SKIPPED
⚠️ integration-amazon.aws-12 SKIPPED
⚠️ integration-amazon.aws-13 SKIPPED
⚠️ integration-amazon.aws-14 SKIPPED
⚠️ integration-amazon.aws-15 SKIPPED
⚠️ integration-amazon.aws-16 SKIPPED
⚠️ integration-amazon.aws-17 SKIPPED
⚠️ integration-amazon.aws-18 SKIPPED
⚠️ integration-community.aws-1 SKIPPED
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
✔️ ansible-test-changelog SUCCESS in 2m 21s

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 90e1975 into ansible-collections:stable-4 Oct 19, 2022
@tremble tremble deleted the backport/stable-4/1151 branch October 21, 2022 07:31
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Sep 18, 2023
…s#1162)

Fix issue when creating GSI with global_keys_only

SUMMARY
fixes: ansible-collections#967
Undocumented requirement on NonKeyAttributes that it should be omitted rather than an empty list.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
dynamodb_table
ADDITIONAL INFORMATION
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: Invalid length for parameter GlobalSecondaryIndexUpdates[0].Create.Projection.NonKeyAttributes, value: 0, valid min length: 1
fatal: [localhost]: FAILED! => {"boto3_version": "1.18.47", "botocore_version": "1.21.47", "changed": false, "msg": "Failed to update table: Parameter validation failed:\nInvalid length for parameter GlobalSecondaryIndexUpdates[0].Create.Projection.NonKeyAttributes, value: 0, valid min length: 1"}

Reviewed-by: Markus Bergholz <[email protected]>
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Sep 18, 2023
…s#1162)

Fix issue when creating GSI with global_keys_only

SUMMARY
fixes: ansible-collections#967
Undocumented requirement on NonKeyAttributes that it should be omitted rather than an empty list.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
dynamodb_table
ADDITIONAL INFORMATION
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: Invalid length for parameter GlobalSecondaryIndexUpdates[0].Create.Projection.NonKeyAttributes, value: 0, valid min length: 1
fatal: [localhost]: FAILED! => {"boto3_version": "1.18.47", "botocore_version": "1.21.47", "changed": false, "msg": "Failed to update table: Parameter validation failed:\nInvalid length for parameter GlobalSecondaryIndexUpdates[0].Create.Projection.NonKeyAttributes, value: 0, valid min length: 1"}

Reviewed-by: Markus Bergholz <[email protected]>
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Oct 24, 2023
…s#1162)

Fix issue when creating GSI with global_keys_only

SUMMARY
fixes: ansible-collections#967
Undocumented requirement on NonKeyAttributes that it should be omitted rather than an empty list.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
dynamodb_table
ADDITIONAL INFORMATION
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: Invalid length for parameter GlobalSecondaryIndexUpdates[0].Create.Projection.NonKeyAttributes, value: 0, valid min length: 1
fatal: [localhost]: FAILED! => {"boto3_version": "1.18.47", "botocore_version": "1.21.47", "changed": false, "msg": "Failed to update table: Parameter validation failed:\nInvalid length for parameter GlobalSecondaryIndexUpdates[0].Create.Projection.NonKeyAttributes, value: 0, valid min length: 1"}

Reviewed-by: Markus Bergholz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug community_review integration tests/integration mergeit Merge the PR (SoftwareFactory) module module needs_maintainer needs_triage plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants